<template>
  <div>
    <van-nav-bar title="我的桩站" left-text="返回" left-arrow @click-left="onClickLeft" />
  </div>
<!--  <div style="margin-top: 10px;margin-left: 16px;margin-right: 16px;font-size: 14px;font-family: var(&#45;&#45;van-base-font)">-->
<!--    <span style="">充电桩数量 :</span><span>{{userPoint}}</span>-->
<!--    <hr />-->
<!--  </div>-->
  <div>
    <van-list :finished="finished" finished-text="没有更多了">
      <van-cell v-for="item in myStationList" :key="item" :title="item.stationName" :value="item.stationStatus"
                :label="item.address" />
    </van-list>
  </div>
</template>
<script setup>

import router from "@/router";
import {ref} from "vue";
import {MyStationList} from "@/api/station";

const onClickLeft = () => history.back();
const finished = ref(false);
const myStationList = ref([]);
const searchParams=ref({
  pageNum:1,
  pageSize:10
})

getMyStationList();
function getMyStationList() {
  MyStationList(searchParams.value)
      .then(res => {
        if (res.data.code === 200000) {
          myStationList.value = res.data.data.data;
        } else {
          router.push('/user/login');
        }
      })
}

</script>
<style scoped>
hr {
  height: 0.5px;        /* 亚像素级细线 */
  background: rgba(0,0,0,0.1);  /* 半透明效果 */
  border: none;
  transform: scaleY(0.2);  /* 垂直压缩 */
  transform-origin: 0 0;   /* 防止偏移 */
}
</style>